var alert = Domain(
  data("Error code", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Screenshots",
    gist -> "Each error should have a error code.",
    spec -> "There should exist a unique error code identification for each error as to describe said error.",
    owner -> "design",
	prio -> 4
  ), 
  data("Error description", 
    state -> specified,
    text -> "Elicitation = Task demonstration, Specification = Screenshots",
    gist -> "Description of an error",
    spec -> "A string representing a short descrption of the occured error",
    owner -> "design",
	prio -> 4
  ), 
  data("Error description") has (quality("Errors without code")), 
  data("OS identifier", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Screenshots",
    gist -> "An identifier used when sending developer feedback and error messages",
    spec -> "Includes description of both version and OS type represented as a UTF8 encoded string.",
    owner -> "design",
	prio -> 4
  ), 
  data("Timestamp", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specifcation =  Screenshots",
    gist -> "the error message should contain a timestamp when the error occurred",
    spec -> "A long containing the amount of milliseconds since 01-01-1970.",
    owner -> "design",
	prio -> 4
  ),
  feature("Alert message") has (function("Version message"),function("Error message"),function("Network message"),quality("Alerts written in English"),function("Rate message")), 
  feature("Alert message", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specifcation = Context Diagram",
    gist -> "The application can alert the user through different types of messages",
    spec -> "The product shall support different methods of notifying the user using dialog boxes.",
    owner -> "domain",
    prio -> 5
  ), 
  feature("Error message", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Context Diagram",
    gist -> "Gives an alert to an error occuring",
    spec -> "The product shall support showing error messages to the user through the use of dialog boxes",
    owner -> "domain",
	prio -> 4
  ), 
  feature("Error message") has (data("Timestamp"),data("Error code"),data("Error description"),data("OS identifier"),feature("Execution time error"),quality("Error response time"),feature("Notify developers")), 
  feature("Execution time error", 
    why -> "Only network calls can timeout",
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Feature requirements",
    gist -> "If a phone function times out an error is displayed",
    spec -> "The system shall show an error message when phone function execution time exceeds execution time limit.",
    owner -> "domain",
	prio -> 4
  ), 
  function("Network message", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Feature requirements",
    gist -> "Should inform the user of the status of the network",
    spec -> "The application should show an alert message to the user when encountering a network error.",
    owner -> "domain",
	prio -> 4
  ), 
  function("Network message") has (function("Network timeout"),function("No Internet connection"),function("No data traffic"),function("No server connection")), 
  function("Network timeout", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Feature requirements",
    gist -> "Show alert message on time out",
    spec -> "The system shall show an alert message informing the user when a network function has timed out.",
    owner -> "domain",
	prio -> 2
  ), 
  function("No Internet connection", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Feature requirements",
    gist -> "Show alert message when no internet connection",
    spec -> "The system shall show an alert message informing the user when internet connection is unavailable.",
    owner -> "domain",
	prio -> 2
  ), 
  function("No data traffic", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Feature requirements",
    gist -> "Show alert message when no data traffic",
    spec -> "The system shall show an alert message informing the user when data traffic is disabled.",
    owner -> "domain",
	prio -> 2
  ), 
  function("No server connection", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Feature requirements",
    gist -> "Show alert message when no server connection",
    spec -> "The system shall show an alert message informing the user when connection to the data server is lost.",
    owner -> "domain",
	prio -> 2
  ), 
  feature("Notify developers", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Context Diagram",
    gist -> "The user can notify the developers of an occurred error",
    spec -> "The system shall provide the user with an option to forward error messages to the developers.",
    owner -> "product",
	prio -> 3
  ), 
  feature("Notify developers") enables (quality("Error report read")), 
  function("Rate message", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Feature requirements",
    gist -> "Alerts the user to rate the application",
    spec -> "The application should alert the user to rate the application when the user start the application more than 30 days after the first use of the application.",
    owner -> "product",
	prio -> 4
  ), 
  function("Version message", 
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Context Diagram",
    gist -> "Notify the user when new version is available",
    spec -> "Notify the user via an alert message when there is a new version of the application is available. The alert sheet provides 2 options, 1: Take the user to the appstore via an appstore url. 2: Dismiss the alert sheet via a cancel button.",
    owner -> "product",
	prio -> 4
  ), 
  quality("Alerts written in English", 
    why -> "We assume that most of our target users will understand English and thus assigned the application to use English.",
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Task Description",
    gist -> "Should be written in English",
    spec -> "Text provided by the system in alert messages should be presented in English.",
    owner -> "design",
	prio -> 7
  ), 
  quality("Error report read", 
    gist -> "The developers should read the error reports",
    spec -> "The error reports should be read in at least 50\\% of the times by the maintainers, as long as the application is maintained.",
    state -> specified,
    owner -> "domain",
    text -> "Elicitation = Brainstorming, Specification = Feature requirements",
    why -> "Too maintain the quality of the application when updates are made, it's important to read the feedback from the users."
  ), 
  quality("Error response time", 
    why -> "If error messages does not appear fast enough the user will not relate it to what they were doing.",
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Task Description",
    gist -> "Errors when they happen",
    spec -> "When the system encounters an error it should display a error message no later than 3 seconds later in 95\\% of the time.",
    owner -> "design",
    prio -> 3
  ), 
  quality("Errors without code", 
    why -> "The user will likely not understand how to avoid the error if the error message includes code lines. And even if it just contains just some code the user will most likely not read it.",
    state -> specified,
    text -> "Elicitation = Brainstorming, Specification = Screenshots",
    gist -> "Error messages without programming code",
    spec -> "Error messages should describe what is wrong in English text without using programming code.",
    owner -> "design",
	prio -> 3
  )
)
